/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface MesOrderTaskOperator extends BasicModel<MesOrderTaskOperator> {
  taskId?: string; // 任务ID
  operator?: string; // 操作工
}

export const mesOrderTaskOperatorList = (params?: MesOrderTaskOperator | any) =>
  defHttp.get<MesOrderTaskOperator>({ url: adminPath + '/mo/operator/mesOrderTaskOperator/list', params });

export const mesOrderTaskOperatorListData = (params?: MesOrderTaskOperator | any) =>
  defHttp.post<Page<MesOrderTaskOperator>>({ url: adminPath + '/mo/operator/mesOrderTaskOperator/listData', params });

export const mesOrderTaskOperatorForm = (params?: MesOrderTaskOperator | any) =>
  defHttp.get<MesOrderTaskOperator>({ url: adminPath + '/mo/operator/mesOrderTaskOperator/form', params });

export const mesOrderTaskOperatorSave = (params?: any, data?: MesOrderTaskOperator | any) =>
  defHttp.postJson<MesOrderTaskOperator>({ url: adminPath + '/mo/operator/mesOrderTaskOperator/save', params, data });

export const mesOrderTaskOperatorDelete = (params?: MesOrderTaskOperator | any) =>
  defHttp.get<MesOrderTaskOperator>({ url: adminPath + '/mo/operator/mesOrderTaskOperator/delete', params });
